package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.CourseAttachment;
import com.ruoyi.system.domain.SysUserPost;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 课程附件表(CourseAttachment)表数据库访问层
 *
 * @author junhao
 * @since 2020-07-07 09:01:02
 */
public interface CourseAttachmentMapper {

    /**
     * 通过ID查询单条数据
     *
     * @param courseAttachmentId 主键
     * @return 实例对象
     */
    CourseAttachment queryById(Long courseAttachmentId);

    List<CourseAttachment> queryAllByCourseIdAndAttachmentType(@Param("courseId") String courseId,@Param("attachmentType") String attachmentType);
    /**
     * 新增数据
     *
     * @param courseAttachment 实例对象
     * @return 影响行数
     */
    int insert(CourseAttachment courseAttachment);

    /**
     * 修改数据
     *
     * @param courseAttachment 实例对象
     * @return 影响行数
     */
    int update(CourseAttachment courseAttachment);

    public int deleteCourseAttachmentByCourseId(Long courseId);


    public int batchCourseAttachment(List<CourseAttachment> courseAttachmentList);
}
